﻿// JavaScript Document
// author:huangzheng
// created date:2003-03-04
// latest modifier:huangzheng
// latest modified date:2003-04-17


//头部控件涉及到的CSS样式表 huangzheng 2003-04-07
document.write("<style type='text/css'>");
document.write("<!--");
document.write("td {font-size: 12px;}");
//document.write(".temp {position: relative;height: 91px;width: 82px;left: 49px;top: 0px;}");
document.write("a.topmnu:link {color: #FFFFFF;text-decoration: none;}");
document.write("a.topmnu:hover {color: #B3F8E0;text-decoration: none;}");
document.write("a.topmnu:visited {color: #FFFFFF;text-decoration: none;}");
document.write("a.topmnu:active {color: #B3F8E0;text-decoration: underline;}");
//document.write(".topmnubg {background-image: url(/images/top_01.gif);background-repeat: repeat-x;}");
//document.write(".shadow2 {filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);}");
//document.write(".login-position {position: relative;z-index: auto;height: 12px;width: 300px;left: 103px;top: 30px;}");
//document.write(".logintxt {color: #353535;}");
document.write("-->");
document.write("</style>");
function preload() { 
	for(var i=0;i<=7;i++)
		MM_preloadImages(imageurl[i]);
}

var imageurl = new Array()			//变换图片
imageurl[0] ="/images/wap_welcome.jpg"		
imageurl[1] ="/images/wap_operation.jpg"	
imageurl[2] ="/images/wap_sp.jpg"		
imageurl[3] ="/images/wap_user.jpg"		
imageurl[4] ="/images/wap_sysmanager.jpg"	
imageurl[5] ="/images/wap_role.jpg"		
imageurl[6] ="/images/wap_other.jpg"		
imageurl[7] ="/images/wap_help.jpg"		

var txtmnu = new Array()			//顶部菜单
txtmnu[0] ="首页"				
txtmnu[1] ="系统管理"				
txtmnu[2] ="用户管理"			
txtmnu[3] ="过滤策略管理"		
txtmnu[4] ="业务管理"		
txtmnu[5] ="结算管理"	
txtmnu[6] ="统计查询"		
txtmnu[7] ="帮助"		


var linkurl = new Array()
linkurl[0] ="welcome.aspx"
linkurl[1] ="IndexSysAdmin.aspx"
linkurl[2] ="IndexUserAdmin.aspx"
linkurl[3] ="IndexPolicyAdmin.aspx"
linkurl[4] ="IndexServiceAdmin.aspx"	
linkurl[5] ="IndexSettlementAdmin.aspx"
linkurl[6] ="IndexQueryAdmin.aspx"	
linkurl[7] ="Help"	

function MM_preloadImages() { 
	var d=document; 
	if(d.images){ 
		if(!d.MM_p) 
			d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
	for(i=0; i<a.length; i++)
    	if (a[i].indexOf("#")!=0){ 
			d.MM_p[j]=new Image; 
			d.MM_p[j++].src=a[i];
		}
	}
}

function MM_swapImgRestore() { 
	var i,x,a=document.MM_sr; 
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
		x.src=x.oSrc;
}

function MM_findObj(n, d) { 
	var p,i,x;  
	if(!d) 
  		d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) 
		x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) 
		x=d.forms[i][n];
  	for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
		x=MM_findObj(n,d.layers[i].document);
  	if(!x && d.getElementById) 
		x=d.getElementById(n); 
	return x;
}

function MM_swapImage() { 
  	var i,j=0,x,a=MM_swapImage.arguments; 
  	document.MM_sr=new Array; 
  	for(i=0;i<(a.length-2);i+=3)
   		if ((x=MM_findObj(a[i]))!=null){
			document.MM_sr[j++]=x; 
			if(!x.oSrc) 
				x.oSrc=x.src; 
			x.src=a[i+2];
		}
}

function MM_showHideLayers() { //v6.0  dsy add
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function high(which2){
	if(window.highlighting)
		clearInterval(highlighting);
	theobject=which2;
	highlighting=setInterval("highlightit(theobject)",50);
}

function low(which2){
	if(window.highlighting)
		clearInterval(highlighting);
	theobject=which2;
	highlighting=setInterval("lowlightit(theobject)",50);	
}
function highlightit(cur2){
	if(cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=5;
	else if(window.highlighting)
		clearInterval(highlighting);
}

function lowlightit(cur2){
	if(cur2.filters.alpha.opacity>0)
		cur2.filters.alpha.opacity-=5;
	else if(window.highlighting){
		clearInterval(highlighting);
		MM_swapImgRestore();
	}
}

function show(index){
	var index=index;
	MM_swapImage('wapimg','',imageurl[index],1);
	high(wapimg);
}
function top(){	//huangzheng 2003-04-03
	document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>");
	document.write("  <tr>");
	document.write("    <td width='45%' background='/images/hight_leftbg.jpg'></td>");
	document.write("	<td width='10%'>");
	document.write("<table width='780' height='166' border='0' align='center' cellpadding='0' cellspacing='0' background='/images/bg_grid.gif'>");
	document.write("  <tr>");
	document.write("    <td height='122'><table width='780' border='0' cellspacing='0' cellpadding='0'>");
	document.write("        <tr>");
	document.write("          <td width='178' height='60' rowspan='2' valign='bottom'><img src='/images/title_temp.gif' width='151' height='29'></td>");
	document.write("          <td width='179' rowspan='3' background='/images/top_03.jpg'><div id='waplayer' style='position: relative;height: 91px;width: 82px;left: 49px;top: 0px;'><img style='filter:alpha(opacity=40)' src='/images/spacer.gif' name='wapimg' width='82' height='90'></div></td>");
	document.write("          <td width='423' height='35'>&nbsp;</td>");
	document.write("        </tr>");
	document.write("        <tr>");
	document.write("          <td height='25' align='right' valign='bottom' background='/images/top_05.gif'>");
	document.write("           <table width='220' border='0' cellspacing='0' cellpadding='0'>");
	document.write("              <tr align='center'> ");
	document.write("                <td width='35%' style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' onclick=javascript:openChagePaswordWindow()>更改密码</a></td>");
	document.write("                <td width='35%' style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a target='_blank' href='/SysAdmin/frmOperatorRegistration.aspx?key_id=self' class='topmnu'>更改资料</a></td>");
	document.write("                <td width='25%' style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' name='IsExit' onclick='javascript:SureExit(IsExit)'>退出</a></td>");
	document.write("                <td><img src='/images/spacer.gif' width='1' height='20'></td>");
	document.write("              </tr>");
	document.write("            </table></td>");
	document.write("        </tr>");
	document.write("        <tr>");
	document.write("          <td height='62'><img src='/images/top_08.jpg'></td>");
	document.write("          <td><img src='/images/top_09.jpg'></td>");
	document.write("        </tr>");
	document.write("      </table></td>");
	document.write("  </tr>");
	document.write("  <tr>");
	document.write("    <td height='30'><script language='JavaScript'>topmenunew()</script></td>");
	document.write("  </tr>");
	document.write("     <td><img src='/images/top_18.gif' width='780' height='14'></td>");
	document.write("  </tr>");
	document.write("</table>");
	document.write("	</td>");
	document.write("	<td width='45%' background='/images/hight_rightbg.jpg'></td>");
	document.write("  </tr>");
	document.write("</table>");
}

function topmenunew(){				//新菜单启用
	var mnunumber=8;			//顶部菜单数目
	document.write("	  <table width='780' border='0' cellspacing='0' cellpadding='0'>");
	document.write("        <tr> ");
	document.write("          <td style='background-image: url(/images/top_01.gif);background-repeat: repeat-x;'>");
	document.write("		    <table width='500' border='0' cellpadding='0' cellspacing='0' background='/images/top_07.gif'>");
	document.write("              <tr> ");
	document.write("                <td><img src='/images/top_10_short.gif'></td>");
	for(i=0;i<=mnunumber-1;i++){
		document.write("                <td><img src='/images/spacer.gif' width='8' height='1'></td>");
		document.write("                <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='"+linkurl[i]+"' class='topmnu' onMouseOver='show(" +i+")' onMouseOut='low(wapimg)'>"+txtmnu[i]+"</a></td>");
		document.write("                <td><img src='/images/spacer.gif' width='8' height='1'></td>");
		document.write("                <td><img src='/images/top_02.gif'></td>");
	}
	document.write("                <td><img src='/images/spacer.gif' width='50' height='1'></td>");
	document.write("                <td><img src='/images/top_06.jpg'></td>");
	document.write("              </tr>");
	document.write("          </table></td>");
	
	document.write("          <td width='10' valign='top'><img src='/images/top_04.gif' width='10' height='17'></td>");
	document.write("        </tr>");
	document.write("      </table>");
}


function SureDelete()
{
	if (document.activeElement.id == "btnDelete")
		if (confirm("确实要删除这条记录吗？") == true)
			return true;
		else
			return false;
}
function SureExit(linkHref)
{
	var link = linkHref;
	if (confirm("确实要退出吗？") == true)
	{ 
		link.href = "/SPLogin.aspx";
	}
	else
	{
		link.href = "#";
	}
}function topsmall(){				//最小高度控件顶部

	document.write("<table width='100%' height='44' border='0' cellpadding='0' cellspacing='0' background='/images/small_bg.gif'>");
	document.write("  <tr>");
	document.write("    <td align='center' valign='top'><img src='/images/spacer.gif' width='1' height='3'><table width='780' height='26' border='0' cellpadding='0' cellspacing='0' background='/images/small_mid.gif'>");
	document.write("        <tr>");
	document.write("          <td><script language='JavaScript'>topmenusmall()</script></td>");
	document.write("          <td align='right'><table width='100' border='0' cellspacing='0' cellpadding='0'>");
	document.write("              <tr>");
	document.write("                <td><img src='/images/small_goto.gif'></td>");
	document.write("                <td><img src='/images/spacer.gif' width='3' height='1'></td>");
	document.write("                <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' onclick=javascript:openChagePaswordWindow()>更改密码</a></td>");
	document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
	document.write("				<td><img src='/images/small_goto.gif' ></td>");
	document.write("                <td><img src='/images/spacer.gif' width='3' height='1'></td>");
	document.write("                <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' name='IsExit' onclick='javascript:SureExit(IsExit)'>退出</a></td>");
	document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
	document.write("                <td><img src='/images/small_right.gif'></td>");
	document.write("              </tr>");
	document.write("            </table></td>");
	document.write("        </tr>");
	document.write("      </table></td>");
	document.write("  </tr>");
	document.write("</table>");
}
function topmenusmall(){			//最小高度控件顶部菜单
	var mnunumber=8;			//顶部菜单数目
	document.write("			<table width='100' border='0' cellspacing='0' cellpadding='0'>");
	document.write("              <tr>");
	document.write("                <td><img src='/images/small_left.gif'></td>");
	document.write("                <td><img src='/images/small_divid.gif'></td>");
	for(i=0;i<=mnunumber-1;i++){
		document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
		document.write("                <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='"+linkurl[i]+"' class='topmnu'>"+txtmnu[i]+"</a></td>");
		document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
		document.write("                <td><img src='/images/small_divid.gif'></td>");
	}
	document.write("              </tr>");
	document.write("            </table>");
}
function toplownew(){				//中等高度控件顶部huangzheng 2003-04-05
	document.write("<table width='100%' border='0' cellpadding='0' cellspacing='0' background='/images/bg_grid.gif'>");
	document.write("  <tr>");
	document.write("    <td><img src='/images/spacer.gif' width='1' height='6'></td>");
	document.write("  </tr>");
	document.write("  <tr>");
	document.write("    <td><table width='100%' height='59' border='0' cellpadding='0' cellspacing='0'>");
	document.write("        <tr> ");
	document.write("          <td width='45%' rowspan='2' background='/images/low_left_bgnew.gif'></td>");
	document.write("          <td valign='top' background='/images/low_main_bg.gif'><img src='/images/low_main.jpg' width='780' height='34'></td>");
	document.write("          <td width='45%' rowspan='2' background='/images/low_right_bgnew.gif'></td>");
	document.write("        </tr>");
	document.write("        <tr>");
	document.write("          <td><table width='780' border='0' cellpadding='0' cellspacing='0' background='/images/low_mnu_mid.gif'>");
	document.write("              <tr> ");
	document.write("                <td><script language='JavaScript'>topmenulownew()</script></td>");
	document.write("                <td align='right'><table width='100' border='0' cellspacing='0' cellpadding='0'>");
	document.write("                    <tr>");
	document.write("					  <td><img src='/images/small_goto.gif'></td>");
	document.write("                      <td><img src='/images/spacer.gif' width='3' height='1'></td>");
	document.write("                      <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' onclick=javascript:openChagePaswordWindow()>更改密码</a></td> ");
	document.write("                      <td><img src='/images/spacer.gif' width='6' height='1'></td>");
	document.write("                      <td><img src='/images/small_goto.gif'></td>");
	document.write("                      <td><img src='/images/spacer.gif' width='3' height='1'></td>");
	document.write("                      <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a target='_blank' href='/SysAdmin/frmOperatorRegistration.aspx?key_id=self' class='topmnu'>更改资料</a></td>");
	document.write("                      <td><img src='/images/spacer.gif' width='6' height='1'></td>");
	document.write("                      <td><img src='/images/small_goto.gif' ></td>");
	document.write("                      <td><img src='/images/spacer.gif' width='3' height='1'></td>");
	document.write("                      <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' name='IsExit' onclick='javascript:SureExit(IsExit)'>退出</a></td>");
	document.write("                      <td><img src='/images/low_mnu_right.jpg'></td>");
	document.write("                    </tr>");
	document.write("                  </table></td>");
	document.write("              </tr>");
	document.write("            </table></td>");
	document.write("        </tr>");
	document.write("      </table></td>");
	document.write("  </tr>");
	document.write("  <tr>");
	document.write("    <td height='15' background='/images/low_bottom_bg.gif'></td>");
	document.write("  </tr>");
	document.write("</table>");
}
function topmenulownew(){			//中等高度顶部菜单huangzheng 2003-04-05
	var mnunumber=8;			//顶部菜单数目
	document.write("					<table width='200' border='0' cellpadding='0' cellspacing='0'>");
	document.write("                    <tr> ");
	document.write("                      <td><img src='/images/low_mnu_left.jpg'></td>");
	document.write("                      <td><img src='/images/low_mnu_divid.gif'></td>");
	for(i=0;i<=mnunumber-1;i++){
	document.write("                      <td><img src='/images/spacer.gif' width='8' height='1'></td>");
	document.write("                      <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='"+linkurl[i]+"' class='topmnu'>"+txtmnu[i]+"</a></td>");
	document.write("                      <td><img src='/images/spacer.gif' width='8' height='1'></td>");
	document.write("                      <td><img src='/images/low_mnu_divid.gif'></td>");
	}
	document.write("                    </tr>");
	document.write("                  </table>");
}
function topsmallframe(){				//最小高度控件顶部，frame使用



	document.write("<table width='100%' height='44' border='0' cellpadding='0' cellspacing='0' background='/images/small_bg.gif'>");
	document.write("  <tr>");
	document.write("    <td align='center' valign='top'><img src='/images/spacer.gif' width='1' height='3'><table width='780' height='26' border='0' cellpadding='0' cellspacing='0' background='/images/small_mid.gif'>");
	document.write("        <tr>");
	document.write("          <td><script language='JavaScript'>topmenusmallframe()</script></td>");
	document.write("          <td align='right'><table width='100' border='0' cellspacing='0' cellpadding='0'>");
	document.write("              <tr>");
	document.write("                <td><img src='/images/small_goto.gif'></td>");
	document.write("                <td><img src='/images/spacer.gif' width='3' height='1'></td>");
	document.write("                <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' onclick=javascript:openChagePaswordWindow()>更改密码</a></td>");
	document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
	document.write("				<td><img src='/images/small_goto.gif' ></td>");
	document.write("                <td><img src='/images/spacer.gif' width='3' height='1'></td>");
	document.write("                <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a href='#' class='topmnu' name='IsExit' onclick='javascript:SureExit(IsExit)'>退出</a></td>");
	document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
	document.write("                <td><img src='/images/small_right.gif'></td>");
	document.write("              </tr>");
	document.write("            </table></td>");
	document.write("        </tr>");
	document.write("      </table></td>");
	document.write("  </tr>");
	document.write("</table>");
}
function topmenusmallframe(){			//最小高度控件顶部菜单,frame使用


	var mnunumber=8;			//顶部菜单数目
	document.write("			<table width='100' border='0' cellspacing='0' cellpadding='0'>");
	document.write("              <tr>");
	document.write("                <td><img src='/images/small_left.gif'></td>");
	document.write("                <td><img src='/images/small_divid.gif'></td>");
	for(i=0;i<=mnunumber-1;i++){
		document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
		document.write("                <td nowrap style='filter: DropShadow(Color=#444444, OffX=1, OffY=1, Positive=1);'><a target='_top' href='"+linkurl[i]+"' class='topmnu'>"+txtmnu[i]+"</a></td>");
		document.write("                <td><img src='/images/spacer.gif' width='6' height='1'></td>");
		document.write("                <td><img src='/images/small_divid.gif'></td>");
	}
	document.write("              </tr>");
	document.write("            </table>");
}
function openChagePaswordWindow(){
	var openurl="/SysAdmin/frmChangePassword.aspx";
	var winheight=280;
	var winwidth=720;
	var x=(screen.height-winheight)/2;
	var y=(screen.width-winwidth)/2;
	var theopenwindow;
	theopenwindow=window.open(openurl,"newwin","height="+winheight+" ,width="+winwidth+",top="+x+",left="+y+"");
	theopenwindow.focus();
}
function openRegisterWindow(){
	var openurl="/SysAdmin/frmOperatorRegistration.aspx?key_id=self";
	var winheight=480;
	var winwidth=720;
	var x=(screen.height-winheight)/2;
	var y=(screen.width-winwidth)/2;
	var theopenwindow;
	theopenwindow=window.open(openurl,"newwin","height="+winheight+" ,width="+winwidth+",top="+x+",left="+y+"");
	theopenwindow.focus();
}
function openWindow(openurl)
{
	var winheight=500;
	var winwidth=780;
	var x=(screen.height-winheight)/2;
	var y=(screen.width-winwidth)/2;
	var theopenwindow;
	theopenwindow=window.open(openurl,"newwin","height="+winheight+" ,width="+winwidth+",top="+x+",left="+y+",scrollbars=yes");
	theopenwindow.focus();
}